<template>
  <div>
    <div class="Certification_Form">
      <el-form ref="form" :model="form" label-width="110px">
        <h1>教师资格认证</h1>
        <el-divider content-position="center"></el-divider>
        <el-form-item label="申请人姓名">
          <el-input v-model="form.name"></el-input>
        </el-form-item>
        <el-form-item
          label="身份证号"
          :rules="[
            {
              type: 'string',
              trigger: 'blur',
              required: 'true',
              pattern: /^(^\d{18}$)$/,
              message: '请输入正确的身份证号码'
            }
          ]"
        >
          <el-input v-model="form.id"></el-input>
        </el-form-item>
        <el-form-item label="教师资格证号码">
          <el-input v-model="form.number"></el-input>
        </el-form-item>
        <el-form-item>
          <el-button
            type="primary"
            @click="onSubmit(1)"
            style="margin-top: 20px"
            >提交认证</el-button
          >
          <el-button @click="back">取消</el-button>
        </el-form-item>
      </el-form>
    </div>
  </div>
</template>

<script>
export default {
  name: "Identity",
  props: {},
  data() {
    return {
      form: {
        name: "",
        region: "",
        date1: "",
        date2: "",
        delivery: false,
        type: [],
        resource: "",
        desc: "",
        email: ""
      }
    };
  },

  components: {},

  computed: {},

  beforeMount() {},

  mounted() {},

  methods: {
    onSubmit() {
      this.$emit("identityResult", 1);
    },
    back() {
      this.$router.go(-1);
    }
  },

  watch: {}
};
</script>
<style scoped lang="scss">
.Certification_Form {
  margin-left: 23vw;
  background-color: rgb(255, 255, 255);
  box-shadow: 0px 0px 8px rgb(200, 192, 184);
  border-radius: 3px;
  padding: 20px;
  // border: 1px solid black;
  width: 40vw;
  padding-top: 2vh;
}
</style>
